home *** CD-ROM | disk | FTP | other *** search
- 4.3 REGRESSION CURVE FITTING
-
-
- Using this feature the user can fit an analytic function to a data.
- The program allows four types of functions:
-
- 1. Polynomial : 1st to the 8th order polynom (A+B*X+C*X^2+.....
- ..+H*X^8). The data should be in the form of two
- columns, the first column is the dependent variable
- and the second is the independent variable.
- 2. Log/power : Product of powers (8 max) (A*B^X*C^Y*.....*H^U), the
- data can be in the form of 2 to 8 columns. The first
- column is the independent variable.
- 3. Exponent : A*EXP(X), and the data should be in the form of two
- columns, the first column is the dependent variable
- and second is the independent variable.
- 4. Multi_linear: Linear function of 8 variables maximum,
- (A+B*Y+C*Y+.......+H*U) the data can be in the form
- of 2 to 8 columns. The first column is the dependent
- variable.
-
-
- Where:
-
- A,B,C...H - Coefficients to be found
- X,Y,....U - Independent variables
-
-
- 4.3A <C>urve_fit
-
-
- Choose the <C>urve_fit menu item to get the next menu:
-
- Import Poly. Log/power Exp. Multi_linear Data_save Graph_save Help
-
-
- 4.3B <I>mport
-
-
- Choose the <I>mport menu item to get the next prompt:
-
- Input the file name - ISRA6
-
- Type the file name and press ENTER to view the next screen :
-
- ____________________________________________________________________________
-
- Import Poly. Log/power Exp. Multi_linear Data_save Graph_save Help
- Import data file (list) of numbers [ESC] - Previous menu
- A B C D E
- 1 ====================================================================
- 2 Units | Output/Input | Memory |
- 3 ====================================================================
- 4 None | 0.00 | 0.00|
- 5 ====================================================================
- GA GB GC GD GE
- 3 8.154845 1
- 4 22.16716 2
- 5 60.25661 3
- 6 163.7944 4
- 7 445.2394 5
- 8 1210.286 6
- 9 3289.899 7
- 10 8942.873 8
- 11 24309.25 9
- 12 66079.39 10
- 13
- 14
- 15
- 16
- ____________________________________________________________________________
-
-
- NOTE: The imported data file represents an exponent function.
-
-
- 4.3C <P>olynomial
-
-
- Press <p> to get the next prompt:
-
- Polynom order (8 max) - 3
-
- The user can choose 1st to 8th order polynom.
-
- In this example we will try to fit a 3rd order polynom to the data.
- The program will display the regression curve fitting graphs (the data
- and the fitted curve (see POLYNOM3.PIC). If you print this graph using
- Lotus PRINTGRAPH you will find that we need to use higher order
- polynom.
-
- Type 3 and press ENTER to view the graph.
-
- Press [ESC] to see the next screen:
-
- ____________________________________________________________________________
-
- Import Poly. Log/power Exp. Multi_linear Data_save Graph_save Help
- Import data file (list) of numbers [ESC] - Previous menu
- A B C D E
- 1 ====================================================================
- 2 Units | Output/Input | Memory |
- 3 ====================================================================
- 4 None | 0.00 | 0.00|
- 5 ====================================================================
- FQ FR FS FT FU FV FW
- 3 Regression Output:
- 4 Constant -15553.4
- 5 Std Err of Y Est 4428.812
- 6 R Squared 0.970260
- 7 No. of Observations 10
- 8 Degrees of Freedom 6
- 9
- 10 X Coefficient(s)
- 11
- 12 17328.98 -4880.03 391.9952
- 13
- 14 Std Err of Coef.
- 15
- 16 6442.657 1328.901 79.68790
- ____________________________________________________________________________
-
-
- This is the standard Lotus regression output table.
-
- The fitted curve can be expressed analytically as:
-
- Y = -15553.4 +17328.98*X -4880.03*X^2 + 391.9952*X^3
-
-
- 4.3D <L>og/power
-
-
- This option enables the use of a product of powers
-
- x y u
- like: A * B * C ... G
-
- as the fitted function.
-
- Where x,y and u are to be determined and A,B,C and G are known. The
- maximum number of products is 8, but the user needs to use only the
- number of data columns less 1. For example if the data file includes 7
- columns the first column is the dependent function and the rest 6 are
- for the independent variables, therefore the user can fit a function
- which is a product of 6 powers maximum. In our example we have only
- two columns therefore we need to choose 1 power only.
-
- Press <L> to get the next prompt:
-
- Number of powers (Number of columns LESS ONE!, 8 max) - 1
-
- Since in this example we have only two columns type 1 and press ENTER.
-
- The program displays the regression curve fitting graphs as Log-Log
- graph (the data and the fitted curves, see LOG1.PIC). If you print
- this graph using Lotus PRINTGRAPH you will find that the log/power
- option doesn't fit so well.
-
- Press [ESC] to get the next screen:
-
- ____________________________________________________________________________
-
- Import Poly. Log/power Exp. Multi_linear Data_save Graph_save Help
- Import data file (list) of numbers [ESC] - Previous menu
- A B C D E
- 1 ====================================================================
- 2 Units | Output/Input | Memory |
- 3 ====================================================================
- 4 None | 0.00 | 0.00|
- 5 ====================================================================
- FQ FR FS FT FU FV FW
- 3 Regression Output:
- 4 Constant 0.661512
- 5 Std Err of Y Est 0.986340
- 6 R Squared 0.905661
- 7 No. of Observations 10
- 8 Degrees of Freedom 8
- 9
- 10 X Coefficient(s)
- 11
- 12 3.930705
- 13
- 14 Std Err of Coef.
- 15
- 16 0.448525
- ____________________________________________________________________________
-
-
- In this screen it can be seen that R Squared is far from 1, as the
- R Squared gets closer to 1 the better the fit is.
-
- The fitted curve can be expressed as:
-
- LN(Y) = .661512 + 3.930705 * LN(X)
-
- and by representing the constant .661512 as LN(EXP(.661512)) we can
- write:
-
- Y = EXP(.661512) * X^3.930705
-
- in case of more powers the function can be expressed as:
-
- Y = EXP(Constant) * X^coef1 * Y^coef2 *.....
-
-
- 4.3D <E>xponent
-
-
- The program displays the regression curve fitting graphs as Log(Y) vs.
- X (the data and the fitted curves, see EXPONENT.PIC). If you print
- this graph using Lotus PRINTGRAPH you will find that it fits well.
-
- Press [ESC] to view the next screen:
-
- ____________________________________________________________________________
-
- Import Poly. Log/power Exp. Multi_linear Data_save Graph_save Help
- Import data file (list) of numbers [ESC] - Previous menu
- A B C D E
- 1 ====================================================================
- 2 Units | Output/Input | Memory |
- 3 ====================================================================
- 4 None | 0.00 | 0.00|
- 5 ====================================================================
- FQ FR FS FT FU FV FW
- 3 Regression Output:
- 4 Constant 1.098612
- 5 Std Err of Y Est 0.000000
- 6 R Squared 1
- 7 No. of Observations 10
- 8 Degrees of Freedom 8
- 9
- 10 X Coefficient(s)
- 11
- 12 1.000000
- 13
- 14 Std Err of Coef.
- 15
- 16 0.000000
- ____________________________________________________________________________
-
-
- In this screen it can be seen that R Squared=1 therefore the curve is
- well fitted.
-
- The fitted curve can be expressed as:
-
- LN(Y) = 1.098612 + 1 * X
-
- by representing the constant 1.098612 as LN(EXP(1.098612)) we can
- write:
-
- Y = EXP(1.098612) * EXP(X^1)
-
- and in general terms:
-
- Y = EXP(constant) * EXP(X)
-
-
- 4.3E <M>ulti-linear
-
-
- Press <m> to get the next prompt:
-
- Number of independent variables (Number of columns LESS ONE!,8max) - 1
-
- In this example we will try to fit a 1 variable linear function to the
- data (because the imported file has only two columns). To see the
- results you can print the file (LINEAR.PIC).
-
- Type 1 and press ENTER to view the graph.
-
- Press [ESC] to get the next screen:
-
- ____________________________________________________________________________
-
- Import Poly. Log/power Exp. Multi_linear Data_save Graph_save Help
- Import data file (list) of numbers [ESC] - Previous menu
- A B C D E
- 1 ====================================================================
- 2 Units | Output/Input | Memory |
- 3 ====================================================================
- 4 None | 0.00 | 0.00|
- 5 ====================================================================
- FQ FR FS FT FU FV FW
- 3 Regression Output:
- 4 Constant -16853.7
- 5 Std Err of Y Est 15506.45
- 6 R Squared 0.513903
- 7 No. of Observations 10
- 8 Degrees of Freedom 8
- 9
- 10 X Coefficient(s)
- 11
- 12 4964.891
- 13
- 14 Std Err of Coef.
- 15
- 16 1707.204
- ____________________________________________________________________________
-
-
- In this screen it can be seen that R Squared is far from 1 (we tried
- to fit a linear function to data which describes an exponent), as R
- Squared get closer to 1 the better the fit is.
-
- The fitted curve can be expressed as:
-
- FUNC = Constant + coef1*X1 + coef2*X2 + .....
-